<!DOCTYPE html>
<html>
	<head>
		<title>特效药品咨询</title>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
		<link rel="stylesheet" href="${s.base}/mobile/newcss/weui.min.css">
		<link rel="stylesheet" href="${s.base}/mobile/newcss/jquery-weui.css">
		<link rel="stylesheet" href="${s.base}/mobile/newcss/base.css?123456">
		<link rel="stylesheet" type="text/css" href="${s.base}/mobile/css/city.css"/>
		<link rel="stylesheet" type="text/css" href="${s.base}/mobile/js/DateSelector/DateSelector.css?rev=@@hash"/>
	</head>


	<style type="text/css">
		html,body{background:#ffffff;}
		.icon{width: 1rem; height: 1rem;}
		.radiow{width: 0.8rem; height: 0.8rem; margin: 0.3rem 0.1rem;}
		.xyg-comp-list-select{width:96%; margin: 0.2rem 2%; border-radius: 0.5rem; height:auto;}
		.xyg-comp-list-select-desc{width:100%;text-align:center;color:#ffffff; letter-spacing: 0.01rem; border-radius: 0.2rem 0.2rem 0px 0px; background: #069AFE;border-right: 0.001rem solid #f5f5f5;border-left: 0.001rem solid #f5f5f5;}
		.xyg-comp-list-select-item{width:94%; padding:0px 3%;  color:#333333; letter-spacing: 0.01rem;}
		.xyg-comp-list-select-item input::-webkit-input-placeholder {color: #999999;}
		.xyg-comp-list-select-item .xyg-comp-list-select-item-title{width:25%; font-size: 16px; line-height: 2rem; letter-spacing: 1px; color:#8c8c8c; height:2rem; text-align:left; float:left;}
		.xyg-comp-list-select-item .xyg-comp-list-select-item-content{width:75%;font-size: 16px; height:2rem;line-height: 2rem; letter-spacing: 1px; color:#8c8c8c; text-align:left; float:left;}
		.xyg-comp-list-select-item .xyg-comp-list-select-item-content input[type='text']{width:90%; margin-right: 10%; font-size: 14px; height:1.8rem; line-height:1.8rem;background-color:transparent;border:0; text-align:right;}
		.xyg-comp-list-select-item .xyg-comp-list-select-item-content input[class='inputicon']{width:80%; margin-right: 3%; }
		.xyg-comp-list-select-item-lineTitle{width:100%; font-size: 16px; letter-spacing: 1px; color:#8c8c8c; padding: 0.2rem 0px; text-align:left;}
		.xyg-comp-list-select-item-lineContent input[type='text']{width:96%; font-size: 16px; height:2rem; line-height:2rem; padding: 0px 2%; background-color:#ffffff;border:1px solid #e3e3e3; border-radius: 0.2rem;}
		.xyg-comp-list-select-item-lineContent{padding-bottom: 0.3rem; position: relative;}
		.xyg-comp-list-select-item-lineContent .iconContent{padding-bottom: 0.3rem; position: absolute; right:0.6rem; top: 0.7rem;}
		.xyg-comp-list-select-textarea{width:90%;  color:#333333;padding:0px 5%;height:13.2rem;font-size: 0.8rem;  letter-spacing: 0.01rem; background: #FFF; border: 0.001rem solid #f5f5f5;}
		.xyg-comp-list-select-textarea .xyg-comp-list-select-textarea-title{width:100%; line-height: 2rem; height:2rem; text-align:left;}
		.xyg-comp-list-select-textarea .xyg-comp-list-select-textarea-content{width:100%; height:4rem; text-align:left; float:left;}
		.xyg-comp-list-select-textarea .xyg-comp-list-select-textarea-content textarea{width:92%; padding: 0.2rem 4%; height:9.6rem; margin-bottom: 1rem; line-height:1rem;background-color:#E5E5E5;;border:0; text-align:left;}

		.xyg-comp-xy{height:2rem; line-height:2rem;width:93%; margin:0px 2% 0px 5%;}
		.xyg-bottom{width:90%; height:auto;  margin:1.5rem 5%;}
		.xyg-bottom  .xyg-btn{
			position: relative;
			background: #dddddd;
			border: 1px solid #e3e3e3;
			display: block;
			margin-left: auto;
			margin-right: auto;
			padding-left: 14px;
			padding-right: 14px;
			box-sizing: border-box;
			font-size: 18px;
			text-align: center;
			text-decoration: none;
			color: #8e8e8e;
			line-height: 2.55555556;
			border-radius: 5px;
			-webkit-tap-highlight-color: rgba(0,0,0,0);
			overflow: hidden;
		}
	</style>
	<body>
	<div id="showContent">
		<div class="xyg-comp-list-select">

			<div class="xyg-comp-list-select-item">
				<input type="hidden" id="id" value="${webSub.id}"/>
				<div class="xyg-comp-list-select-item-lineTitle">
					<span style="color:#ff3b30;"></span>服务
				</div>
				<div class="xyg-comp-list-select-item-lineContent">
					<input type="text" id="colId" value="${webSub.colId}" placeholder="请选择服务" />
					<div class="iconContent">
						<svg class="icon" aria-hidden="true"><use xlink:href="#icon-xiangxia"></use></svg>
					</div>
				</div>
			</div>
			<div class="xyg-comp-list-select-item">
				<div class="xyg-comp-list-select-item-lineTitle">
					<span style="color:#ff3b30;"></span>姓名
				</div>
				<div class="xyg-comp-list-select-item-lineContent">
					<input type="text" id="name" value="${webSub.name}" placeholder="请输入姓名" />
				</div>
			</div>

			<div class="xyg-comp-list-select-item">
				<div class="xyg-comp-list-select-item-lineTitle">
					<span style="color:#ff3b30;"></span>身份证号
				</div>
				<div class="xyg-comp-list-select-item-lineContent">
					<input type="text" id="cardNo" value="${webSub.cardNo}" placeholder="请输入身份证号" />
				</div>
			</div>
			<div class="xyg-comp-list-select-item">
				<div class="xyg-comp-list-select-item-lineTitle">
					<span style="color:#ff3b30;"></span>联系电话
				</div>
				<div class="xyg-comp-list-select-item-lineContent">
					<input type="text" id="phone" value="${webSub.phone}" placeholder="请输入联系电话" />
				</div>
			</div>
			<div class="xyg-comp-list-select-item">
				<div class="xyg-comp-list-select-item-lineTitle">
					<span style="color:#ff3b30;"></span>药品英⽂名
				</div>
				<div class="xyg-comp-list-select-item-lineContent">
					<input type="text" id="productName" value="${webSub.productName}" placeholder="请输入药品英⽂名" />
				</div>
			</div>
			<div class="xyg-comp-list-select-item">
				<div class="xyg-comp-list-select-item-lineTitle">
					<span style="color:#ff3b30;"></span>诊断报告
				</div>
				<div class="xyg-comp-list-select-item-lineContent">
					<input type="text" id="report" value="${webSub.report}" placeholder="请输入诊断报告" />
				</div>
			</div>
			<div class="xyg-comp-list-select-item">
				<div class="xyg-comp-list-select-item-lineTitle">
					<span style="color:#ff3b30;"></span>壹家人价格(港币)
				</div>
				<div class="xyg-comp-list-select-item-lineContent">
					<input type="text" id="adviseMoney" value="${webSub.adviseMoney}"  placeholder="诊所/医院/体检中心到付费用"  readonly/>
				</div>
			</div>
			<div class="xyg-comp-list-select-item">
				<div class="xyg-comp-list-select-item-lineTitle">
					<span style="color:#ff3b30;"></span>预约服务金(人民币)
				</div>
				<div class="xyg-comp-list-select-item-lineContent">
					<input type="text" id="money" value="${webSub.money}"  placeholder="此为本次预约服务收费，不设退款" />
				</div>
			</div>

		</div>
		<div class="xyg-bottom">
			<a href="javascript:;" class="xyg-btn" id="showTooltips" >提交</a>
		</div>
	</div>
	<div id="targetContainers"></div>
	</body>
	<script src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
	<script src="${s.base}/mobile/newjs/jquery-2.1.4.js?12132"></script>
	<script src="${s.base}/mobile/newjs/jquery-weui.js?12132"></script>
	<script src="${s.base}/mobile/fonts/iconfont.js?121322323"></script>
	<script src="${s.base}/mobile/js/base.js?12345454547777"></script>
	<!--js分享代码开始-->

	<input type="hidden" value="${jSTicketShareResponse.appid}" id="appid" />
	<input type="hidden" value="${jSTicketShareResponse.fxTitle}" id="fxTitle" />
	<input type="hidden" value="${jSTicketShareResponse.fxImgUrl}" id="fxImgUrl" />
	<input type="hidden" value="${jSTicketShareResponse.fxDesc}" id="fxDesc" />
	<input type="hidden" value="${jSTicketShareResponse.fxUrl}" id="fxUrl" />
	<input type="hidden" value="${jSTicketShareResponse.nonceStr}" id="nonceStr" />
	<input type="hidden" value="${jSTicketShareResponse.timestamp}" id="timestamp" />
	<input type="hidden" value="${jSTicketShareResponse.signature}" id="signature" />
	<script src="${s.base}/mobile/js/share.js"></script>

	<script src="${s.base}/mobile/js/DateSelector/DateSelector.js"></script>
	<script type="text/javascript">
		var memberId = '${memberId}';

        // 性别
        $("#selectSex").select({
            title: "请选择性别",
            items: [{title:'男',value:'1'}, {title:'女',value:'2'}],
            onClose: function(d) {
                $("#sex").val(d.data.values);
            },
            onOpen: function() {
            },
        });

        // 服务
        $("#colId").select({
            title: "请选择服务",
           /* items: [{title:'Crystal Tomato水晶番茄',value:'1500/盒'}],*/
            items:${itemSelectStr},
            onClose: function(d) {
                $("#colId").val(d.data.titles);
                $("#adviseMoney").val(d.data.values);
            },
            onOpen: function() {
            },
        });
        $("#showTooltips").on("click", function () {
            var id = $("#id").val();
            var colId = $("#colId").val();
            if (colId == null || colId == "") {
                $.toast("请选择服务", "text");
                return false;
            }

            var name = $("#name").val();
            if (name == null || name == "") {
                $.toast("请输入姓名", "text");
                return false;
            }
            var cardNo = $("#cardNo").val();
            if (cardNo == null || cardNo == "") {
                $.toast("请输入身份证号", "text");
                return false;
            }

            var phone = $("#phone").val();
            if (phone == null || phone == "") {
                $.toast("请输入联系电话", "text");
                return false;
            }
            if (!(/^1(3|4|5|6|7|8|9)\d{9}$/.test(phone))) {
                $.toast("联系电话有误，请重填", "text");
                return false;
            }
            var productName = $("#productName").val();
            if (productName == null || productName == "") {
                $.toast("请输入药品英⽂名", "text");
                return false;
            }
            var report = $("#report").val();
            if (report == null || report == "") {
                $.toast("请输入诊断报告", "text");
                return false;
            }
            var adviseMoney = $("#adviseMoney").val();
            if (adviseMoney == null || adviseMoney == "") {
                $.toast("请选择服务", "text");
                return false;
            }

            var money = $("#money").val();
            if (money == null || money == "") {
                $.toast("请输入实际价格", "text");
                return false;
            }
			//预约类型：1、成⼈/⼉童疫苗，2、基因/体检，3、医学美容，4、特效药品咨询
			var subType="4";
            var param = {
                id: id,
                memberId: memberId,
                colId: colId,
                name:name,
                subType: subType,
                cardNo: cardNo,
                phone: phone,
                productName: productName,
                report: report,
                money: money,
                adviseMoney: adviseMoney
            };
            $.showLoading("正在提交中");
            $.post("/phone/webSubSave", param, function (result) {
                if(1==result.returnInfo.state){
                    $.hideLoading();
                    $.alert("预约提交成功，等待审核！", function() {
                        //点击确认后的回调函数
                        myHome(memberId);
                    });

                }else{
                    $.hideLoading();
                    $.toast("预约提交失败", "text");
                }

            }, "json");


        });
	</script>
</html>
